package org.springframework.remoting.jsonrpc.test.contact;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;

@Entity
public class Contact implements Serializable{
  @Id
  @GeneratedValue(strategy = GenerationType.TABLE)
  long id;
  String firstName;
  String lastName;
  String phone;
  
  //@Column(name = "COMPANY_ID")
  //private long companyId;
  
  @ManyToOne(optional = true)
  @JoinColumn(name="COMPANY_ID",referencedColumnName="COMPANY_ID")
  private Company company;
  
 
  public long getId() {
    return id;
  }
  public void setId(long id) {
    this.id = id;
  }
  public String getFirstName() {
    return firstName;
  }
  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }
  public String getLastName() {
    return lastName;
  }
  public void setLastName(String lastName) {
    this.lastName = lastName;
  }
  public String getPhone() {
    return phone;
  }
  public void setPhone(String phone) {
    this.phone = phone;
  }
  public Company getCompany() {
    return company;
  }
  public void setCompany(Company company) {
    this.company = company;
  }

}
